package com.ht.api.gaoxian;

import com.ht.api.db.hlink.JsonTreeProcessor;

import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;

public class ResultJson {


    public static void main(String[] args) {
        String result = """
        		{
    "ToUserName": "ww669ca452439131bc",
    "FromUserName": "sys",
    "CreateTime": 1739253589,
    "MsgType": "event",
    "Event": "change_external_contact",
    "ChangeType": "del_external_contact",
    "UserID": "update",
    "ExternalUserID": "wmFibqCgAAciiYGZwXC0dJJJxW3LV9eg",
    "appid": 1876990838014349312
}
                """;


        JsonTreeProcessor.JsonTreeNode tree = JsonTreeProcessor.parseJsonToTree(result);
        JSONObject treeJson = JsonTreeProcessor.treeToJson(tree);
        System.out.println(JSONUtil.toJsonPrettyStr(treeJson));
    }

}
